package com.plian.system.dao.fr.indicatorsstdvalue;

import com.plian.Tools.pagedata.PageData;
import com.plian.system.dao.DaoSupport;
import com.plian.system.model.page.Page;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
* 说明：指标标准值表
*/
@Component
public class  IndicatorsStdvalueDao {
@Resource(name = "daoSupport")
private DaoSupport dao;

	/**
	* 新增
	* @param pd
	* @throws Exception
	*/
	public void save(PageData pd) throws Exception {
		dao.save("IndicatorsStdvalueMapper.save",pd);
	}

	/**
	* 修改
	* @param pd
	* @throws Exception
	*/
	public void edit(PageData pd) throws Exception {
		dao.update("IndicatorsStdvalueMapper.edit",pd);
	}

	/**
	* * 根据Id获取一条数据
	* @param id
	* @return
	* @throws Exception
	*/
	public PageData findbyid(String id) throws Exception {
		return (PageData) dao.findForObject("IndicatorsStdvalueMapper.findbyid",id);
	}
	/**
	 * * 根据Id获取一条数据
	 * @param
	 * @return
	 * @throws Exception
	 */
	public PageData findfindustrybyname(PageData pd) throws Exception {
		return (PageData) dao.findForObject("IndicatorsStdvalueMapper.findfindustrybyname",pd);
	}
	/**
	 * * 根据行业企业年度查询数据
	 * @param
	 * @return
	 * @throws Exception
	 */
	public PageData findrepeat(PageData pd) throws Exception {
		return (PageData) dao.findForObject("IndicatorsStdvalueMapper.findrepeat",pd);
	}
	/**
	* 列表
	* @return
	* @throws Exception
	*/
	public List<PageData> listPage(Page page) throws Exception {
		return (List<PageData>) dao.findForList("IndicatorsStdvalueMapper.listPage",page);
	}

    /**
     * 根据企业和年份和指标和指标code
     * @return
     * @throws Exception
     */
    public List<PageData> findbyOrgAndYear(PageData pd) throws Exception {
        return (List<PageData>) dao.findForList("IndicatorsStdvalueMapper.findbyOrgAndYear",pd);
    }
	/**
	* 批量删除
	* @return
	* @throws Exception
	*/
	public void del_ids(List<String> ids) throws Exception {
		dao.delete("IndicatorsStdvalueMapper.del_ids",ids);
	}
}
